import React, {Suspense, useEffect} from 'react'
import { useRoutes} from 'react-router-dom'
import routes from '@/router/router'

import {recommendList} from '@/api/recommend'
import Footer from "@/components/layout/footer/footer";
import Header from "@/components/layout/header/header";
function App() {
  useEffect(()=>{
    recommendList().then(res=>{
      console.log(res)
    })
  },[])
  return (
    <div className="App">
      <Header></Header>
      <div className='main'>
        <Suspense fallback='加载中...'>
          {useRoutes(routes)}
        </Suspense>
      </div>
      <Footer></Footer>
    </div>
  );
}

export default App
